<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title Test</title>
</head>
<body>
    啦啦啦，今日特价
    <div th:object="${book}">
        <p th:text="'书名:'+*{name}"></p>
        <p th:text="'价格:'+${book.price}"></p>
        <!--与th:if判断相反-->
        <p th:unless="*{price ==20 }">看见了吗</p>
        <input type="button" th:onclick="'allbuy()'" value="购买">

        <p th:text="|测试字符串拼接,你说要买*{name}是吗?|"></p>

        <a href="www.baidu.com" th:href="@{/page/test(name=*{name})}">一个链接</a>
        <p th:text="${#strings.replace(book.name,'放弃','治疗')}"></p>
    </div>
</body>
<script>
    function allbuy(){
        alert("我买了")
    }
</script>
</html>